const Options = {
    top: {
        title: '排行图',
        chartType: 'top',
        option:{
            title: {
                text: '排序图示例',
                subtext: 'top-chart',
                sublink: '#',
                show: false,
                // left: 'center',
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                top:'0%',
            },
            xAxis: {
                type: 'value',
                show: false,
            },
            yAxis: {
                type: 'category',
                data: ['A111', 'B222', 'C333', 'D444', 'E5'],
                inverse: true,
                axisTick: { show: false },
            },
            series: [
                {
                    realtimeSort: true,
                    name: 'X',
                    type: 'bar',
                    data: [200, 3432, 1111, 434, 6645],
                    label: {
                        show: true,
                        position: 'right',
                    },
                    showBackground: true,
                    backgroundStyle: {
                        color: 'rgba(180, 180, 180, 0.2)',
                    },
                },
            ],
        }
    },
    bar:{
        title: '柱状图',
        chartType: 'bar',
        option:{
            title:{text: '柱状图实例', show: false},
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                top:'0%',
            },
            yAxis: {
                type: 'value',
                show: false,
            },
            xAxis: {
                type: 'category',
                show: false,
                data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
            },
            series: [
                {
                    name: 'Direct',
                    type: 'bar',
                    data: [320, 302, 301, 334, 390, 330, 320]
                },
                {
                    name: 'Mail Ad',
                    type: 'bar',
                    data: [120, 132, 101, 134, 90, 230, 210]
                },
                {
                    name: 'Affiliate Ad',
                    type: 'bar',
                    data: [220, 182, 191, 234, 290, 330, 310]
                },
                {
                    name: 'Video Ad',
                    type: 'bar',
                    data: [150, 212, 201, 154, 190, 330, 410]
                },
            ]
        }
    },
    pie: {
        title: '饼图',
        chartType: 'pie',
        option: {
            title: {
                text: '饼图示例',
                subtext: '纯属虚构',
                left: 'left',
                show: false,
            },
            grid: {
                left: '0%',
                right: '4%',
                bottom: '3%',
                top:'0%',
            },
            series: [
                {
                    name: '访问来源',
                    type: 'pie',
                    radius: '80%',
                    data: [
                        { value: 1048, name: '搜索引擎' },
                        { value: 735, name: '直接访问' },
                        { value: 580, name: '邮件营销' },
                        { value: 484, name: '联盟广告' },
                        { value: 300, name: '视频广告' },
                    ],
                    labelLine: {
                        show: false
                    },
                    label: {
                        show: false,
                        position: 'center'
                    },
                    // emphasis: {
                    //     itemStyle: {
                    //         shadowBlur: 10,
                    //         shadowOffsetX: 0,
                    //         shadowColor: 'rgba(0, 0, 0, 0.5)',
                    //     },
                    // },
                },
            ],
        }
    },
    circular: {
        title: '环形图',
        chartType: 'circular',
        option: {
            title: {
                text: '环形图图示例',
                subtext: '',
                left: 'left',
                show: false,
            },
            series: [
                {
                    name: '',
                    type: 'pie',
                    radius: ['50%', '90%'],
                    data: [
                        { value: 1048, name: '搜索引擎' },
                        { value: 735, name: '直接访问' },
                        { value: 580, name: '邮件营销' },
                        { value: 484, name: '联盟广告' },
                        { value: 300, name: '视频广告' },
                    ],
                    labelLine: {
                        show: false
                    },
                    label: {
                        show: false,
                        position: 'center'
                    },
                },
            ],
        }
    },
    line: {
        title: '折线图',
        chartType: 'line',
        option: {
            title: {
                text: '折线图示例',
                show: false,
            },
            grid: {
                left: '3%',
                right: '4%',
                bottom: '3%',
                top:'0%'
            },
            xAxis: {
                type: 'category',
                boundaryGap: false,
                show: false,
                data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
            },
            yAxis: {
                type: 'value',
                show: false,
            },
            series: [
                {
                    name: '邮件营销',
                    type: 'line',
                    symbol: 'none',
                    data: [120, 132, 101, 134, 90, 230, 210],
                },
                {
                    name: '联盟广告',
                    type: 'line',
                    symbol: 'none',
                    data: [220, 182, 191, 234, 290, 330, 310],
                },
                {
                    name: '视频广告',
                    type: 'line',
                    symbol: 'none',
                    data: [150, 232, 201, 154, 190, 330, 410],
                },
                {
                    name: '直接访问',
                    type: 'line',
                    symbol: 'none',
                    data: [320, 332, 301, 334, 390, 330, 320],
                },
                {
                    name: '搜索引擎',
                    type: 'line',
                    symbol: 'none',
                    data: [820, 932, 901, 934, 1290, 1330, 1320],
                },
                {
                    name: '搜索',
                    type: 'line',
                    smooth: true,
                    symbol: 'none',
                    data: [20, 932, 901, 934, 190, 1330, 120],
                },
                {
                    name: '搜',
                    type: 'line',
                    smooth: true,
                    symbol: 'none',
                    data: [20, 932, 901, 934, 190, 1330, 120],
                },
            ],
        }
    },
    gauge: {
        // 仪表图
        title: '仪表图',
        chartType: 'gauge',
        option: {
            title:{text: '仪表图实例', show: false},
            series: [
                {
                    type: 'gauge',
                    progress: {
                        show: true,
                        width: 19, // 数据宽度
                    },
                    axisLine: {
                        lineStyle: {
                            width: 19, // 数据背景宽度
                        },
                    },
                    itemStyle: {
                        color: '#58D9F9', // 数据颜色
                        shadowColor: 'rgba(0,138,255,0.7)',
                        shadowBlur: 10,
                        shadowOffsetX: 2,
                        shadowOffsetY: 2,
                    },
                    splitLine: {
                        show: false,
                    },
                    axisTick: {
                        show: false,
                    },
                    axisLabel: {
                        show: false,
                    },
                    pointer: {
                        show: false,
                    },
                    // detail: {
                    //     valueAnimation: true,
                    //     fontSize: 50,
                    //     // formatter: '> {value}', // 格式
                    // },
                    // title: {
                    //     offsetCenter: [0, '-20%'],
                    //     fontSize: 10,
                    // },
                    data: [
                        {
                            value: '70',
                            // name: '仪表图', // 名称
                        },
                    ],
                },
            ],
        }
    },
    radar: {
        title: '雷达图',
        chartType: 'radar',
        option: {
            title: {
                text: '基础雷达图',
                show: false,
            },
            // legend: {
            //     orient: 'vertical',
            //     right: 'right',
            //     data: ['预算分配（Allocated Budget）', '实际开销（Actual Spending）'],
            // },
            // tooltip: {
            //     trigger: 'axis',
            // },
            radar: {
                // shape: 'circle',
                indicator: [
                    { name: '销售（Sales）', max: 6500 },
                    { name: '管理（Administration）', max: 16000 },
                    { name: '信息技术（Information Technology）', max: 30000 },
                    { name: '客服（Customer Support）', max: 38000 },
                    { name: '研发（Development）', max: 52000 },
                    { name: '市场（Marketing）', max: 25000 },
                ],
            },
            series: [
                {
                    name: '预算 vs 开销（Budget vs spending）',
                    type: 'radar',
                    tooltip: {
                        trigger: 'item',
                    },
                    symbol: 'none',
                    areaStyle: {
                        opacity: 0.1,
                    },
                    data: [
                        {
                            value: [4200, 3000, 20000, 35000, 50000, 18000],
                            name: '预算分配（Allocated Budget）',
                        },
                        {
                            value: [5000, 14000, 28000, 26000, 42000, 21000],
                            name: '实际开销（Actual Spending）',
                        },
                    ],
                    labelLine: {
                        show: false
                    },
                    label: {
                        show: false,
                        position: 'center'
                    },
                },
            ],
        }
    },
    funnel: {
        title: '漏斗图',
        chartType: 'funnel',
        option: {
            title: {
                text: '漏斗图',
                subtext: '纯属虚构',
                show: false,
            },
            grid: {
                left: '0%',
                right: '0%',
                bottom: '0%',
                top:'0%',
            },
            series: [
                {
                    name: '漏斗图',
                    type: 'funnel',
                    left: '10%',
                    top: 60,
                    //x2: 80,
                    bottom: 60,
                    width: '80%',
                    // height: {totalHeight} - y - y2,
                    min: 0,
                    max: 100,
                    minSize: '0%',
                    maxSize: '100%',
                    sort: 'descending',
                    gap: 2,
                    label: {
                        show: true,
                        position: 'inside',
                    },
                    labelLine: {
                        length: 10,
                        lineStyle: {
                            width: 1,
                            type: 'solid',
                        },
                    },
                    itemStyle: {
                        borderColor: '#fff',
                        borderWidth: 1,
                    },
                    emphasis: {
                        label: {
                            fontSize: 20,
                        },
                    },
                    data: [
                        { value: 60, name: '访问' },
                        { value: 40, name: '咨询' },
                        { value: 20, name: '订单' },
                        { value: 80, name: '点击' },
                        { value: 100, name: '展现' },
                    ],
                },
            ],
        }
    },
    table: {
        title: '表格',
        chartType: 'table',
        data: {
            keyMap: [
                { name: '样例1', code: 'wang' },
                { name: '样例2', code: 'zhang' },
                { name: '样例3', code: 'li' },
            ],
            fieldMap: {
                name: '名称',
                code:'英文名',
                time: '时间',
                address: '地点',
            },
            wang: [
                { name: '王小虎', code: 'wang', time: '2021/4/21', address: '上海市普陀区金沙江路 1518 弄', },
                { name: '王小虎', code: 'wang', time: '2021/4/22', address: '上海市普陀区金沙江路 1518 弄', },
                { name: '王小虎', code: 'wang', time: '2021/4/23', address: '上海市普陀区金沙江路 1518 弄', },
            ],
            zhang: [
                { name: '张小虎', code: 'zhang', time: '2021/4/21', address: '上海市普陀区金沙江路 1518 弄', },
                { name: '张小虎', code: 'zhang', time: '2021/4/21', address: '上海市普陀区金沙江路 1518 弄', },
                { name: '张小虎', code: 'zhang', time: '2021/4/22', address: '上海市普陀区金沙江路 1518 弄', },
                { name: '张小虎', code: 'zhang', time: '2021/4/23', address: '上海市普陀区金沙江路 1518 弄', },
            ],
            li: [
                { name: '李小虎', code: 'li', time: '2021/4/23', address: '上海市普陀区金沙江路 1518 弄', },
                { name: '李小虎', code: 'li', time: '2021/4/23', address: '上海市普陀区金沙江路 1518 弄', },
            ],
        },
    },
    card: {
        title: '累计销量（亿元）',
        chartType: 'card',
        data: '342,090',
    },
};
export default Options;
